/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day05.pt02.fileio;

import exercises.day04.pt01.bean.AccountRegistration;
import exercises.day04.pt01.bean.Account_Holder;
import exercises.day04.pt01.bean.Account_Holder_Transaction;
import exercises.day04.pt01.dao.Account_Holder_DAO;
import exercises.day04.pt01.dao.Account_Holder_Transaction_DAO;
import exercises.day04.pt01.dao.Account_Registration_DAO;
import exercises.day04.pt02.Exception.AHBalanceIsNullException;
import exercises.day04.pt02.Exception.AHIdIsNullException;
import exercises.day04.pt02.Exception.AHTIDIsNotNumericException;
import exercises.day04.pt02.Exception.AccountTypeIsInvalidException;
import exercises.day04.pt02.Exception.AccountTypeIsNullException;
import exercises.day04.pt02.Exception.AddressIsNullException;
import exercises.day04.pt02.Exception.AddressLenghtLessThan25Exception;
import exercises.day04.pt02.Exception.AnnualIncomeIsNullException;
import exercises.day04.pt02.Exception.AnnualIncomeValidationException;
import exercises.day04.pt02.Exception.FirstNameIsNullException;
import exercises.day04.pt02.Exception.IncomeIsNotDoubleException;
import exercises.day04.pt02.Exception.LastNameIsNullException;
import exercises.day04.pt02.Exception.NameIsJohnDoeException;
import exercises.day04.pt02.Exception.PhoneIsNullException;
import exercises.day04.pt02.Exception.PhoneLenghtLessThan7Exception;
import exercises.day04.pt02.Exception.RegisterIdIsNotIntegerException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Student
 */
public class main {

    public static void main(String args[]) {
        /*
        
        try {
        AccountRegistration a = new AccountRegistration("28",
        "fname", "lname", "addressssssssssssssssssssssssssssssssssss", 
        "Savings", 
        "56", "phone111");
        
        Account_Holder b = new Account_Holder("38",
        a.getRegId(),
        "123");
        
        Account_Holder_Transaction c = new Account_Holder_Transaction("15",
        b.getAhID(), "Opening", 
        "0", b.getBalance());
        
        
        Account_Registration_DAO rdao = new Account_Registration_DAO();
        Account_Holder_DAO hdao = new Account_Holder_DAO();
        Account_Holder_Transaction_DAO ahdao = new Account_Holder_Transaction_DAO();
        
        
        rdao.register(a);
        hdao.register(b);
        ahdao.log(c);
        
        
        
        } catch (AHTIDIsNotNumericException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AHIdIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AHBalanceIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        }  catch (AccountTypeIsInvalidException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AccountTypeIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AddressIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AddressLenghtLessThan25Exception ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (FirstNameIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (LastNameIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (NameIsJohnDoeException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AnnualIncomeIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (AnnualIncomeValidationException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (PhoneIsNullException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (PhoneLenghtLessThan7Exception ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (RegisterIdIsNotIntegerException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IncomeIsNotDoubleException ex) {
        Logger.getLogger(main.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
         */
        
        
        ReadWrite rw = new ReadWrite();
     //  rw.readSave("Q:\\day05.txt");
        
     //   rw.searchAccountType("Savings");
        
        
    }
}
